package labox.innovation.gameserver.skills.conditions;

import labox.innovation.gameserver.skills.Env;
import labox.innovation.util.Rnd;

/**
 * @author Advi
 * 
 */
public class ConditionGameChance extends Condition {
	private final int _chance;

	public ConditionGameChance(int chance) {
		_chance = chance;
	}

	/**
	 * 
	 * @see labox.innovation.gameserver.skills.conditions.Condition#testImpl(labox.innovation.gameserver.skills.Env)
	 */
	@Override
	public boolean testImpl(Env env) {
		return Rnd.get(100) < _chance;
	}
}
